using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class web_pages_nguoitimviec_xemhoso : System.Web.UI.Page
{
    string sql = "";
    public Common comm = new Common();
    public string id;
    public DataTable dtt;
    protected void Page_Load(object sender, EventArgs e)
    {
        sql = "SELECT ConNguoi_nguoi.*, NguoiTimViec_ho_so.*,NguoiTimViec_ho_so.kich_hoat AS kich_hoat_ho_so,DanhMuc_chuc_danh.ten_chuc_danh" +
                " FROM ConNguoi_nguoi INNER JOIN"+
                " NguoiTimViec_ho_so ON ConNguoi_nguoi.ma_nguoi = NguoiTimViec_ho_so.ma_nguoi left join DanhMuc_chuc_danh on "+
                " DanhMuc_chuc_danh.ma_chuc_danh=NguoiTimViec_ho_so.chuc_danh_mong_muon";
        if (!IsPostBack)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["id"])) id = comm.TextFormat(Request.QueryString["id"]).Trim();
            if (!string.IsNullOrEmpty(id))
            {
                dtt = comm.getDataTable(sql+" where ma_ho_so='"+id + "'");
            }
        }
    }
    protected void btnBack_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/web/pages/nguoitimviec_quanly.aspx?page=hosodatao");
    }
    protected void btnDetail_Click(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request.QueryString["id"])) id = comm.TextFormat(Request.QueryString["id"]).Trim();
        if (!string.IsNullOrEmpty(id))
        {
            Response.Redirect("~/web/pages/nguoitimviec_quanly.aspx?page=ntv_chitiet&id=" + id);
        }
        
    }
}
